package org.wz.complex.work.entity.auth.sysinfo;

import jakarta.validation.constraints.NotBlank;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import org.wz.complex.work.anno.ComposeEntity;
import org.wz.complex.work.anno.Deploy;
import org.wz.complex.work.anno.RemoveCols;

import java.util.List;


@Deploy
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("auth_sysinfo_menu")
public class SysinfoMenu {

    @TableId(type = IdType.AUTO)
    private Long id;

	/**
	 * 菜单名称
	 */
	@NotBlank(message = "菜单名称不能为空")
	private String name;

	/**
	 * 父级ID
	 */
	@NotBlank(message = "父级ID不能为空")
	private Long pid;

	/**
	 * 图标
	 */
	private String icon;

	/**
	 * 排序
	 */
	private Integer seq;

	/**
	 * 标记
	 */
	private String flag;

	/**
	 * 链接
	 */
	private String url;

	/**
	 * 编码
	 */
	private String code;

	/**
	 * 级别
	 */
	private Integer grade;

	/**
	 * 微服务ID
	 */
	private Long sysinfoMicroId;

	@ComposeEntity
	@TableField(exist = false) 
	private SysinfoMicro sysinfoMicro;  // 微服务实体类   

	@TableField(exist = false)
	private List<SysinfoMenu> subList;
    

}
